<!-- include tpl=usercp/head title=订单明细 -->
<div class="container-fluid no-gutters main layout-main">
	<!-- include tpl=usercp/sidebar -->
	<div class="layout-right">
		
		<!-- include tpl=usercp/header -->
		<div class="layout-body">
			
			<!-- include tpl=usercp/order-baseinfo -->
			
			<!-- if $billing -->
			<div class="card mt-2">
				<div class="card-header">
					账单地址<small style="font-weight:normal;color:gray;float:right;"><small>非收货地址</small></small>
				</div>
				<div class="card-body">
					<div class="row">
						<div class="col-4 col-md-2 p-1 text-right">姓名：</div>
						<div class="col-8 col-md-4 p-1"><!-- if $billing.fullname -->{$billing.fullname}<!-- else -->{$billing.lastname}{$billing.firstname}<!-- /if --></div>
						<div class="col-4 col-md-2 p-1 text-right">联系方式：</div>
						<div class="col-8 col-md-4 p-1">
							{$billing.tel}<!-- if $billing.tel && $billing.mobile --> / <!-- /if -->{$billinbilling.mobile}
							<!-- if $billing.email --> / {$billing.email}<!-- /if -->
						</div>
					</div>
					<div class="row">
						<div class="col-4 col-md-2 p-1 text-right">地址：</div>
						<div class="col-8 col-md-10 p-1">
							{$billing.province}
							<!-- if $billing.province != $billing.city -->
							{$billing.city}
							<!-- /if -->
							{$billing.county}
							{$billing.address}
							<!-- if $billing.address2 -->{$billing.address2}<!-- /if -->
							<!-- if $billing.zipcode --><i>（邮编：{$billing.zipcode}）</i><!-- /if -->
						</div>
					</div>
				</div>
			</div>
			<!-- /if -->
			<!-- if $address -->
			<div class="card mt-2">
				<div class="card-header">
					收货人信息
				</div>
				<div class="card-body">
					<div class="row">
						<div class="col-4 col-md-2 p-1 text-right">姓名：</div>
						<div class="col-8 col-md-4 p-1"><!-- if $address.fullname -->{$address.fullname}<!-- else -->{$address.lastname}{$address.firstname}<!-- /if --></div>
						<div class="col-4 col-md-2 p-1 text-right">联系方式：</div>
						<div class="col-8 col-md-4 p-1">
							{$address.tel}<!-- if $address.tel && $address.mobile --> / <!-- /if -->{$address.mobile}
							<!-- if $address.email --> / {$address.email}<!-- /if -->
						</div>
					</div>
					<div class="row">
						<div class="col-4 col-md-2 p-1 text-right">地址：</div>
						<div class="col-8 col-md-10 p-1">
							{$address.province}
							<!-- if $address.province != $address.city -->
							{$address.city}
							<!-- /if -->
							{$address.county}
							{$address.address}
							<!-- if $address.address2 -->{$address.address2}<!-- /if -->
							<!-- if $address.zipcode --><i>（邮编：{$address.zipcode}）</i><!-- /if -->
						</div>
					</div>
				</div>
			</div>
			<!-- /if -->
			<div class="card mt-2">
				<div class="card-header">
					产品信息
				</div>
				<div class="card-body">
					<table class="table">
						<thead>
							<tr>
								<th>图片</th>
								<th>信息</th>
								<th>数量</th>
								<th>价格</th>
							</tr>
						</thead>
						<tbody>
							<!-- loop from=$rslist key=$key value=$value -->
							<tr>
								<td>
									<!-- if $value.thumb && file_exists($value.thumb) -->
									<img src="{$value.thumb}" width="50" height="50" border="0" />
									<!-- else -->
									<img src="{#images#}/blank.gif" width="50" height="50" border="0" />
									<!-- /if -->
								</td>
								<td>
									<div><b>{$value.title}</b></div>
									<!-- loop from=$value.ext key=$k value=$v id=$tmpid -->
									<div>{$v.title}：{$v.content}</div>
									<!-- /loop -->
									<div>售价：{func price_format $value.price $rs.currency_id $rs.currency_id}</div>
								</td>
								<td>{$value.qty}</td>
								<td>{func price_format $value.price*$value.qty $rs.currency_id $rs.currency_id}</td>
							</tr>
							<!-- /loop -->
							<tr>
								<td colspan="4">
									<div class="row">
										<!-- loop from=$pricelist key=$key value=$value id=$tmpid -->
										<div class="col-7 col-sm-10 p-1 text-right">{$value.title}：</div>
										<div class="col-5 col-sm-2 p-1 text-right">{$value.price}</div>
										<!-- /loop -->
										<div class="col-7 col-sm-10 p-1 border-top text-right">订单总价：</div>
										<div class="col-5 col-sm-2 p-1 border-top text-right">{func price_format $rs.price $rs.currency_id $rs.currency_id}</div>
										<!-- if $paid_price -->
										
										
										<div class="col-7 col-sm-10 p-1 text-right">已付款：</div>
										<div class="col-5 col-sm-2 p-1 text-right">{func price_format $paid_price $rs.currency_id $rs.currency_id}</div>
										<div class="col-7 col-sm-10 p-1 text-right">还需付款：</div>
										<div class="col-5 col-sm-2 p-1 text-right">{func price_format $unpaid_price $rs.currency_id $rs.currency_id}</div>
										<!-- /if -->
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			<!-- if $invoice -->
			<div class="card mt-2">
				<div class="card-header">
					发票信息
				</div>
				<div class="card-body">
					<div class="row">
						<div class="col-4 col-md-3 col-xl-2 text-right">类型：</div>
						<div class="col-8 col-md-3 col-xl-2 border-bottom">{$invoice.type}</div>
						<div class="col-4 col-md-3 col-xl-2 border-bottom text-right">抬头：</div>
						<div class="col-8 col-md-3 col-xl-2 border-bottom">{$invoice.title}</div>
						<div class="col-4 col-md-3 col-xl-2 border-bottom text-right">内容：</div>
						<div class="col-8 col-md-3 col-xl-2 border-bottom">{$invoice.content}</div>
					</div>
				</div>
			</div>
			<!-- /if -->
			<!-- if !$pay_end -->
			<div class="card mt-2">
				<div class="card-body">
					<!-- if $session.user_id -->
					<a href="{url ctrl=order func=payment id=$rs.id/}" class="btn btn-primary btn-lg">在线支付</a>
					<!-- else -->
					<a href="{url ctrl=order func=payment sn=$rs.sn passwd=$rs.passwd/}" class="btn btn-primary btn-lg">在线支付</a>
					<!-- /if -->
				</div>
			</div>
			<!-- /if -->
		</div>
	</div>
</div>
<!-- include tpl=usercp/foot -->